package com.dms.modules.cart.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@ApiModel(value = "购物车项DTO", description = "购物车项信息")
public class CartItemDTO {
    
    
    @ApiModelProperty("购物车项ID")
    private Long id;
    
    @ApiModelProperty("商品ID")
    @NotNull(message = "商品ID不能为空")
    private Long productId;
    
    @ApiModelProperty("商品SKU ID")
    private Long skuId;
    
    @ApiModelProperty("商家ID")
    private Long merchantId;
    
    @ApiModelProperty("商家名称")
    private String merchantName;
    
    @ApiModelProperty("商品名称")
    private String productName;
    
    @ApiModelProperty("商品图片")
    private String productImg;
    
    @ApiModelProperty("规格信息JSON")
    private String specInfo;
    
    @ApiModelProperty("商品单价")
    private BigDecimal price;
    
    @NotNull(message = "商品数量不能为空")
    @Min(value = 1, message = "商品数量必须大于0")
    @ApiModelProperty("商品数量")
    private Integer quantity;
} 